<template>
  <div>
    <el-card class="box-card" :style="{ width: cardWidth }" shadow="always">
      <template #header>
        <div class="card-header">
          <span>{{ title }}</span>
          <!-- <el-button class="button" type="text">操作按钮</el-button> -->
        </div>
      </template>
      <div class="list">
        <div v-for="o in 5" :key="o" class="text item">
          {{ "列表内容 " + o }}
        </div>
      </div>
    </el-card>
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: "列表名称",
    },
    cardWidth: {
      type: String,
      default: "300px",
    },
  },
  data() {
    return {};
  },
};
</script>
<style lang="scss" scoped>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.box-card {
  /deep/ .el-card__body {
    height: 350px;
    overflow-y: auto;
  }
}
.list {
  overflow: auto;
  .item {
    margin-bottom: 18px;
  }
  .text {
    font-size: 14px;
  }
}
</style>